function clike#CCppCsJs() abort
    setlocal commentstring=//%s

    function! EatSpace() abort
        while getchar(0)
        endwhile
        while getchar(0)
        endwhile
        while getchar(0)
        endwhile
        return ''
    endfunction

    inoreabbrev <buffer> if if ()<left><c-r>=EatSpace()<cr>
    inoreabbrev <buffer> for for ()<left><c-r>=EatSpace()<cr>
    inoreabbrev <buffer> while while ()<left><c-r>=EatSpace()<cr>
    inoreabbrev <buffer> switch switch ()<left><c-r>=EatSpace()<cr>

    function! RangeForLoop() abort
        call EatSpace()
        let name = input('Name: ')
        if name ==# ''
            let name = 'i'
        endif
        let from = input('From: ')
        if from ==# ''
            let from = '0'
        endif
        let to = input('To: ')
        if to[0] ==# '='
            let to = '= '.to[1:]
        else
            let to = ' '.to
        endif
        return 'for (int '.name.' = '.from.'; '.name.' <'.to.'; '.name.'++)'
    endfunction

    inoreabbrev <buffer> <expr> forr RangeForLoop()
endfunction
